package com.easyJava.utils;


import java.io.BufferedWriter;
import java.io.IOException;

public class BufferedWriterUtils {
    private BufferedWriter bufferedWriter;
    public BufferedWriterUtils(BufferedWriter bufferedWriter){
        this.bufferedWriter = bufferedWriter;
    }

    public void write(String str) throws IOException {
        if(StringUtils.isEmpty(str)) return;
        bufferedWriter.write(str);
        bufferedWriter.newLine();
    }

    public void newLine() throws IOException {
        bufferedWriter.newLine();
    }

    public void flush() throws IOException {
        bufferedWriter.flush();
    }

    public BufferedWriter getBufferedWriter() {
        return bufferedWriter;
    }
}
